<!DOCTYPE html>
<html>
    <meta charset="utf-8">
    <title>FlyProduct</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" type="text/css" href="/public/bootstrap/css/bootstrap-responsive.min.css">
    <link rel="stylesheet" type="text/css" href="/public/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/public/bootstrap/css/bootstrap-datetimepicker.min.css">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }
    </style>

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->



</head>    
<body>
    <?php if ($this->error == 1): ?>
        <div class="alert alert-success">
            Update done.
        </div>
    <?php elseif ($this->error == -110): ?>
        <div class="alert alert-error">
            Update fail, please check your data.
        </div>
    <?php endif; ?>
    <?php echo $this->render('tool/navmenu.phtml') ?>

    <div class="container-fluid">
        <div class="span9">
            <legend>Update album: <?php echo $this->data['title']?></legend>
            <form  class="form-horizontal" action="/public/tool/videoupdate" method="post" id="videoform">
                <input type="hidden" value="<?php echo $this->data['create_time']?>" name="create_time" />
                <input type="hidden" value="<?php echo $this->data['id']?>" name="id" />
                <input type="hidden" value="update" name="update"/>
                <div class="control-group">
                    <label class="control-label">Video name</label>
                    <div class="controls">
                        <input type="text" id="title" name="title" value="<?php echo $this->data['title']?>" placeholder="Enter video's name">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">Thumbnail</label>
                    <div class="controls">
                        <input type="text" id="thumb"  value="<?php echo $this->data['thumb']?>" name="thumb" placeholder="Enter thumb">
                    </div>
                </div>   
                <div class="control-group">
                    <label class="control-label">Video type</label>
                    <div class="controls">
                        <select name="video_type" form="videoform">
                            <option value="1" <?php echo $this->data['video_type'] == 1 ? "selected=true" : ""?> >Short Clip</option>
                            <option value="2" <?php echo $this->data['video_type'] == 2 ? "selected=true" : ""?>  >Music Video</option>
                            <option value="3" <?php echo $this->data['video_type'] == 3 ? "selected=true" : ""?> >Film</option>
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">Link</label>
                    <div class="controls">
                        <input type="text" id="link"  value="<?php echo $this->data['link']?>" name="link" placeholder="Enter link">
                    </div>
                </div>                
                <div class="control-group">
                    <div class="controls">
                        <button type="submit" class="btn btn-primary">Update this video</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</body>
</html>

